package org.adultedu.service;

import org.adultedu.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserService {
    //搜索单个用户
    User querytUser(User user);

    //获取所有用户信息
    List<User> queryAllUser();

    //根据用户id获取用户名
    User queryUserById(int id);

    List queryAdmin(String username);

    int insertAdmin(String id, String username, String password, Integer roleid);

    int insertRole(String id,Integer roleid);

    int updateAdmin(String id,String username,String password,Integer state,String reason,String other);

    int updateRole(String id,Integer roleid);

    int deleteAdmin(String id);
    //根据用户名查询用户信息
    User queryUserByUsername(String username);

    //用户登录验证
    Map UserLogin(String username);

    //根据id修改密码
    int updateUserPwdById(int id);

    //注册一个用户
    int insertUser(User user);

    int insertUserRole(User user);
}
